package com.sg.dto.integration.dataassets;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc EntityIdDto
 * @使用场景
 */
@Data
public class EntityIdDto extends BaseDto implements Serializable {

    /**
     * 冗余内容表主键ID
     */
    @ApiModelProperty("冗余内容表主键ID")
    private String entityId;

    /**
     * 对象名称
     */
    @ApiModelProperty("对象名称")
    private String objectName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        EntityIdDto that = (EntityIdDto) o;
        return entityId == that.entityId && objectName == that.objectName;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), entityId, objectName);
    }

}
